package com.aop.aspect2;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


public class YmStudentDaoImplTest   {
	
	@Test
	public void testName() throws Exception {
		
		ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("com/aop/aspect2/bean.xml");
		
		Object obj = ioc.getBean("ym");
		System.out.println(obj.getClass().getName());
		
		//得到的要用接口来接收
		StudentDao bean = (StudentDao)ioc.getBean("ym");
		System.out.println(bean);
		
		
		bean.insert("xx", 99);
		

		
	}

	
}
